import java.util.Scanner;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/30 8:38
 * @description:
 */
public class Test17 {
  public static void main(String[] args) {
    System.out.println("请输入m:");
    System.out.println("请输入n:");
    Scanner scanner=new Scanner(System.in);
    int m=scanner.nextInt();
    int n=scanner.nextInt();
    int a=sum(n,m);
    System.out.println("偶数和" +a);
  }

  private static int sum(int n, int m) {
    int sum=0;
    for( ;m<n; m++) {
      if (m % 2 == 0) {
        sum = sum + m;
      }
    }
    return sum;
  }
}
